<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
		Remove this if you use the .htaccess -->
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<title>javascript01</title>
		<meta name="description" content="" />
		<meta name="author" content="Student26" />
		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
		<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
		<link rel="shortcut icon" href="/favicon.ico" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
	</head>
	<body>
		<button onclick="hellow();">누르세요</button>
		<script>
			function hellow(){
				
			}
			
			//날짜
			var date1=new Date();
			var date2=new Date("2112, 1, 9");
			document.writeln(date1+"<br>");
			document.writeln(date2+"<br>");
			
			//배열
			var web=new Array();
			document.writeln("값 셋팅 전 web : "+web+"<br>");
			console.log("값 셋팅 전 web : ", web);
			web[0]="HTML5";
			web[1]="java script";
			web[2]="css3";
			document.writeln("값 셋팅 후 web : "+web+"<br>");
			console.log("값 셋팅 후 web : ", web);
			
			var day=["아침", "점심", "저녁"];
			console.log("day : ", day);
			
			var buttons=document.getElementsByTagName("button");
			var button=buttons[0];
			
			console.log("button : ", button);
		</script>
		<div id="c">클릭해보세요</div>
		<div id="on">마우스를 올려보세요</div>
		<div id="off">여기에서 마우스버튼을 떼어보세요.</div>
		<div id="canvas">그림판</div>
		<script>
			var c=document.getElementById("c");
			var on=document.getElementById("on");
			var off=document.getElementById("off");
			var canvas=document.getElementById("canvas");
			
			console.log("before c: ", c);
			
			c.onclick=function(){
				canvas.innerHTML+="c를 클릭하셨군요";
			}
			on.onmouseover=function(){
				canvas.innerHTML+="on 마우스를 올렸군요";
			}
			off.onmouseup=function(){
				canvas.innerHTML+="off 마우스 버튼을 눌렀다가 놓았군요.";
			}
			console.log("after c: ", c);
		</script>
	</body>
</html>